﻿@model Lavka.Models.Orders

@{
    ViewBag.Title = "Редактирование заказа";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <div class="panel ui-corner-all">
        <h2>Заказ № @Model.OrderId от @Model.OrderDate</h2>

        @Html.HiddenFor(model => model.OrderId)

        <div class="editor-label">
            Покупатель
        </div>
        <div class="editor-field">
            @Html.DropDownList("CustomerId", String.Empty)
            @Html.ValidationMessageFor(model => model.CustomerId)
        </div>

        <div class="editor-label">
            Ключ заказа
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OrderKey)
            @Html.ValidationMessageFor(model => model.OrderKey)
        </div>

        <div class="editor-label">
            Дата заказа
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OrderDate)
            @Html.ValidationMessageFor(model => model.OrderDate)
        </div>

        <div class="editor-label">
            @Html.EditorFor(model => model.Pickup)
            @Html.ValidationMessageFor(model => model.Pickup)
            Самовывоз
        </div>

        <div class="editor-label">
            Дополнительная информация
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.EditorFor(model => model.Completed)
            @Html.ValidationMessageFor(model => model.Completed)
            Выполнен
        </div>
        <div class="editor-field">

        </div>

        <div class="navigateButton">
            <input type="submit" value="Сохранить" class="button" />
        </div>
        <div>
            @Html.ActionLink("К списку", "Index")
        </div>
    </div>
}
